Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce log output for DHCP services #2260

Merged
merged 1 commit into from
Jul 6, 2022

Conversation

bcressey
Copy link
Contributor

@bcressey bcressey commented Jul 4, 2022

Issue number:
Fixes #2254

Description of changes:
Changing the log level to "notice" makes it so only new and renewed leases are logged, rather than every step of the lease negotiation process.

Testing done:
Verified that the remaining output consists of messages like these:

Jul 04 16:22:04.002962 localhost wickedd-dhcp4[1521]: eth0: Request to acquire DHCPv4 lease with UUID ab13c362-fe3f-0f00-0306-000002000000
Jul 04 16:22:04.004096 localhost wickedd-dhcp6[1522]: eth0: Request to acquire DHCPv6 lease with UUID ab13c362-fe3f-0f00-0306-000003000000 in mode auto
Jul 04 16:22:04.644916 localhost wickedd-dhcp4[1521]: eth0: Committed DHCPv4 lease with address 10.0.85.39 (lease time 3600 sec, renew in 1800 sec, rebind in 3150 sec)
Jul 04 16:22:05.967654 localhost wickedd-dhcp6[1522]: eth0: Committing DHCPv6 lease with:
Jul 04 16:22:05.967681 localhost wickedd-dhcp6[1522]: eth0    +ia-na.address 2600:1f14:ae2:f103:baa1:f578:6e8a:6b0e/0, pref-lft 140, valid-lft 450
Jul 04 16:23:16.657088 localhost wickedd-dhcp6[1522]: eth0: Committing DHCPv6 lease with:
Jul 04 16:23:16.657114 localhost wickedd-dhcp6[1522]: eth0    +ia-na.address 2600:1f14:ae2:f103:baa1:f578:6e8a:6b0e/0, pref-lft 140, valid-lft 450
Jul 04 16:24:26.668959 localhost wickedd-dhcp6[1522]: eth0: Committing DHCPv6 lease with:
Jul 04 16:24:26.668975 localhost wickedd-dhcp6[1522]: eth0    +ia-na.address 2600:1f14:ae2:f103:baa1:f578:6e8a:6b0e/0, pref-lft 140, valid-lft 450

In steady state in EC2, this results in two log entries every 70 seconds for DHCPv6 leases, and one log entry every 30 minutes for DHCPv4 leases.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Changing the log level to "notice" makes it so only new and renewed
leases are logged, rather than every step of the lease negotiation
process.

Signed-off-by: Ben Cressey <[email protected]>
@bcressey bcressey requested review from zmrow and etungsten July 4, 2022 16:29
@bcressey bcressey merged commit aaab8fc into bottlerocket-os:develop Jul 6, 2022
@bcressey bcressey deleted the wicked-output branch July 6, 2022 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reduce the log level of wickedd-dhcp6
4 participants